/-app
/-app/files
FileEntry.ts
FileList.ts
/-app/layout
/-app/tests
Application.ts
PageLayout.ts
functions.ts
/-boot
/-docs
/-features
/-imports
/-koBindings
/-storage
/-tests ...
/-tests/storage ...
/-tests/storage/attached ...
AttachedStorageTests.ts
IndexedDBStorageTests.ts
LocalStorageStorageTests.ts
WebSQLStorageTests.ts
_sampleTests.ts
/-typings
base.css
stringUtils.ts
teapo.html
108
        unicodeString, 'property452', 'value09823',
109
        callback);
110
    }
111
 
112
    private _update_loadAgain_sameValue_core(fileName: string, property: string, value: string, callback: (error: Error) => void) {
113
      var ukey = this._generateKey();
114
      this._detect.detectStorageAsync(
115
        ukey,
116
        (error, load) => {
117
          load.load({
118
            file: (name, values) => callback(new Error('LoadStorageRecipient.file should not be called.')),
119
            completed: (updater: teapo.storage.attached.UpdateStorage) => {
120
              updater.update(
121
                fileName, property, value,
122
                (error: Error) => {
123
                  this._detect.detectStorageAsync(
124
                    ukey,
125
                    (error, load) => {
126
                      var files: any = {};
127
                      load.load({
128
                        file: (name, values) => files[name] = values,
129
                        completed: (updater) => {
130
                          var fileTxt = files[fileName];
131
                          if (!fileTxt) {
132
                            callback(new Error('File is not reported on subsequent load.'));
133
                          }
134
                          else {
135
                            var propertyValue = fileTxt[property];
136
                            callback(propertyValue === value ? null : new Error('Wrong value ' + propertyValue));
137
                          }
138
                        },
139
                        failed: (error) => callback(error)
140
                      });
141
                    });
142
                });
143
            },
144
            failed: (error) => callback(error)
145
          });
146
        });
147
    }
148
 
149
    migrate(callback: (error: Error) => void) {
150
      var ukey = this._generateKey();
151
      this._detect.detectStorageAsync(
152
        ukey,
153
        (error, load) => {
154
          load.migrate(
155
            2345,
156
            { "file.txt": { property: "value" } },
157
            (error, update) => callback(error));